﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_ascx_EditTemplateTest_EditTempTest : System.Web.UI.UserControl,IEditShowTemplate
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }

    #region IEditShowTemplate 成员

    public void SetField(ConfigColumns cCol, string value, bool isEdit)
    {
        string id = Request.QueryString["id"];
        if (isEdit)
        {
            this.ccc.Text = DBFactory.GetConn().exe1("select content from news where id=" + id);
        }
    }

    public string GetInsertSql(ConfigColumns cCol)
    {
        return "'" + Request.Form["content_EditShow$ccc"].Replace("'", "''") + "'";
    }

    public string GetUpdateSql(ConfigColumns cCol)
    {
        return "content='" + Request.Form["content_EditShow$ccc"].Replace("'", "''") + "'";
    }

    #endregion

    #region IEditShowTemplate 成员


    public string GetInsertSqlBefore(ConfigColumns cCol)
    {
        return string.Empty;
    }

    #endregion
}
